import req from '@/utils/request'
import pretty from '@/utils/pretty'
/**
 * 登录接口
 * @param {object} user
 * @param {string} user.account 用户名
 * @param {string} user.password 密码
 * @returns {Promise}
 *
 */
export const login = (user) =>
  pretty(
    req({
      url: '/user/login',
      method: 'post',
      data: user,
      fullLoading:true
    })
  )
/**
 * 退出登录
 * @returns {Promise}
 */
export const doLogout = () => req.post('/user/logout')

export const doCreateUser = user => req.post('/permission/createUser',user) 